<template>
  <div>
    <!-- 图片回显 -->
    <!-- <UploadImg :image-url="imageUrl" @input="imageUrl = $event" /> -->
    <UploadImg v-model="imageUrl" />
    <div>
      <button @click="changeFn">点击生成二维码</button>
      <!-- 弹框部分 -->
      <Canvas ref="can" />
    </div>
  </div>
</template>
<script>
import Canvas from './text.vue'
export default {
  name: '',
  components: { Canvas },
  data() {
    return {
      imageUrl:
        'http://qwer-1308460156.cos.ap-chengdu.myqcloud.com/1637655345618'
    }
  },
  methods: {
    changeFn() {
      this.$refs.can.dialogVisible = true
      this.$refs.can.text(this.imageUrl)
    }
  }
}
</script>
<style lang="less" scoped></style>
